﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WAD.DAL.Union
{
    public class DAOVersion : DAO_Union
    {
        public static Dictionary<string, object> Get(int id, string fields = "")
        {
            Dictionary<string, object> dic = Get("vifo_users_groups", "groupid=" + id, fields);
            if (dic["GroupSetting"] == DBNull.Value) return null;

            System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
            xml.LoadXml(dic["GroupSetting"].ToString());
            System.Xml.XmlNode item = xml.SelectSingleNode("root/item[@key=\"ass_pc1_5\"]");
            dic["price"] = item.InnerText;
            dic.Remove("GroupSetting");
            return dic;
        }
    }
}
